/**
 * 移动端分类 api 封装
 */
import {getRequest, postRequest} from '/@/lib/axios';

export const mobileCategoryApi = {

    /**
     * 分页查询
     */
    queryPage: (param) => {
        return postRequest('/types/queryPage', param);
    },

    /**
     * 分级查询
     */
    queryByTier: (param) => {
        return postRequest('/types/queryByTier', param);
    },

    /**
     * 增加
     */
    add: (param) => {
        return postRequest('/types/add', param);
    },

    /**
     * 查询详情
     */
    detail: (id) => {
        return getRequest(`/types/detail/${id}`);
    },

    /**
     * 修改
     */
    update: (param) => {
        return postRequest('/types/update', param);
    },


    /**
     * 删除
     */
    delete: (id) => {
        return getRequest(`/types/delete/${id}`);
    },
    /**
     * 估价
     */
    appraise: (id, params) => {
        return getRequest(`/types/appraise/${id}`, params);
    },

    /**
     * 批量删除
     */
    batchDelete: (idList) => {
        return postRequest('/types/batchDelete', idList);
    },
    /**
     * 批量删除
     */
    upOrDown: (id) => {
        return postRequest(`/types/listing/${id}`);
    },

};
